<?php
setcookie("username","",time() + 1800);
setcookie("password","",time() + 1800);

session_destroy();

setcookie("username", "", time()-60*60*24);  
header('Location: login.php');
?>